#!/usr/bin/env python3

PACKAGE = 'vswarm'
LEVEL = 0

from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator
from dynamic_reconfigure.parameter_generator_catkin import double_t, int_t, bool_t

gen = ParameterGenerator()

gen.add(name='use_gmphd', paramtype=bool_t, level=LEVEL,
        description='If true, use GM-PHD filter', default=True)
gen.add(name='survival_prob', paramtype=double_t, level=LEVEL,
        description='Probability of survival (p_s) [%]',
        default=0.99, min=0.0, max=1.0)
gen.add(name='detection_prob', paramtype=double_t, level=LEVEL,
        description='Probability of detection (p_d) [%]',
        default=0.95, min=0.0, max=1.0)
gen.add(name='trunc_thresh', paramtype=double_t, level=LEVEL,
        description='Truncation threshold for pruning (T)',
        default=1e-5, min=0.0, max=1.0)
gen.add(name='merge_thresh', paramtype=double_t, level=LEVEL,
        description='Merging threshold for pruning (U)',
        default=2.0, min=0.0, max=10.0)
gen.add(name='birth_weight', paramtype=double_t, level=LEVEL,
        description='Birth weight (w) [%]',
        default=1e-6, min=0.0, max=1.0)
gen.add(name='process_noise', paramtype=double_t, level=LEVEL,
        description='Process noise (std)',
        default=2.0, min=0.0, max=10.0)
gen.add(name='weight_thresh', paramtype=double_t, level=LEVEL,
        description='Components with weight above this threshold are detections [%]',
        default=0.5, min=0.0, max=1.0)

gen.add(name='max_components', paramtype=int_t, level=LEVEL,
        description='Maximum number of components after pruning (J_max)',
        default=50, min=1, max=100)

gen.add(name='use_dbscan', paramtype=bool_t, level=LEVEL,
        description='If true, use DBSCAN filter', default=True)

gen.add(name='verbose', paramtype=bool_t, level=LEVEL,
        description='Verbose output', default=False)

exit(gen.generate(PACKAGE, 'multi_target_tracking_node', 'MultiTargetTrackingNode'))
